﻿package benchmarks;

import benchmarks.benchmarktests.BenchmarkTest;
import benchmarks.benchmarktests.ReadersWritersTest;

import problemfactories.ReadersWritersFactory;
import problems.readerswriters.IReaderWriter;

public class ReadersWritersBenchmark extends AbstractBenchmark<IReaderWriter>
{
	private int nbReaders;
	private int nbWriters;

	public ReadersWritersBenchmark(int nbReaders, int nbWriters) {
		super(new ReadersWritersFactory());
		this.nbReaders = nbReaders;
		this.nbWriters = nbWriters;
	}

	@Override
	protected BenchmarkTest<IReaderWriter> createBenchmarkTest(IReaderWriter solution) {
		return new ReadersWritersTest(solution, nbReaders, nbWriters);
	}
}